package com.shinewind.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(description = "Comment实体类")
public class Comment implements Serializable {
  @ApiModelProperty(value = "文章id")
  private Integer aId;
  @TableId(type = IdType.ASSIGN_UUID)
  @ApiModelProperty(value = "评论id")
  private String cId;
  @ApiModelProperty(value = "0为顶级评论,否则为二级评论")
  private String parentId;
  @ApiModelProperty(value = "评论的内容")
  private String content;
  @ApiModelProperty(value = "评论的发布时间")
  @TableField(fill = FieldFill.INSERT_UPDATE)
  private Date publishTime;
  @ApiModelProperty(value = "评论的用户id")
  private String uId;
}
